<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCheckScoresDetailsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('check_scores_details', function (Blueprint $table) {
//            $table->comment('学年考核评分详情');
            $table->increments('id');
            $table->integer('check_id')->index('check_id_index');
            $table->integer('ct_id')->index('ct_id_index');
            $table->integer('author_id')->index('author_id_index')->comment('评分人id');
            $table->integer('scale_top_id')->comment('量表顶层id');
            $table->integer('scale_id')->comment('量表id');
            $table->float('scores', 5, 1)->comment('总分');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('check_scores_details');
    }
};
